﻿using MVC_basic.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AppsModel.APIModel
{
    public class APIUser
    {
        public int id { get; set; }
        public string username { get; set; }
        public string email { get; set; }
        public string picUrl { get; set; }

        public APIUser(int id, string username, string email, string picUrl)
        {
            this.id = id;
            this.username = username;
            this.email= email;
            this.picUrl = picUrl;
        }
        public static APIUser UserToAPI(User user)
        {
            APIUser apiuser = new APIUser(user.id, user.username, user.email, user.picUrl);
            return apiuser;
        }

    }
}
